
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>Scratch 2.0</title>
	<%= stylesheet_link_tag    "application" %>
	<%= javascript_include_tag "application" %>
	<%= csrf_meta_tags %>
	<META NAME="iic2515-2" CONTENT="2.0">
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
	<!-- Start menu css and js files here 
		// initialise plugins
		jQuery(function(){
			jQuery('ul.sf-menu').superfish();
		});-->
</script>
<!-- End menu css and js files here -->
<!-- Begin featured slider css & js files -->
<!-- End featured slider css & js files -->
<!--[if IE 6]>
<script type='text/javascript' src='js/dd_belated_png.js'></script>
<script>DD_belatedPNG.fix('.pngfix');</script>
<![endif]-->

</head>

<body>
	<%= gflash %>
	<div id="user_nav">
	  <% if current_user %>
	    Iniciado como <%= current_user.email %>.
	    <%= link_to "Cerrar sesión", log_out_path %>
	  <% else %>
		<%= form_tag sessions_path do %>
		    <%= label_tag :login %>
		    <%= text_field_tag :login, params[:login] %>
		    <%= label_tag :password %>
		    <%= password_field_tag :password %>
		  <%= submit_tag "Iniciar sesión" %> 	
		<%end%>
		<%= link_to "Olvido su contraseña?", new_password_reset_path %> o
		<%= link_to "Crear una cuenta", sign_up_path %>
		<%= check_box_tag :remember_me, 1, params[:remember_me]  %>
		<%= label_tag :remember_me, "Recuerdame" %></br>
		
	  <% end %>
	</div>
<div class="subbg">
<div class="subheader">
      <!--start:header -->
      <div class="container_16">
            <!--start:header container -->
            <!--start:logo -->
            <div class="grid_5">
			<%=image_tag "ornare/logo.png", :alt => "DesignPlus", :class =>"pngfix logo"%>
			</div>
            <!--end:logo -->
            <div class="grid_11">
                  <!--start:menu grid -->
                  <div class="top-menu pngfix">
                        <!--start:top-menu -->
                        <ul class="sf-menu">
                              <!--start:sf-menu -->
                              <li> <%= link_to "Home", home_path%> </li>
                              <li class="current"> <a href="">Usuarios</a>
                                    <ul>
                                          <!--start:dropdown -->
										  <%if can? :index, User%>
                                          <li> <%= link_to "Indexar", users_path%></li>
										  <%end%>									  
                                    </ul>
                                    <!--end:dropdown -->
                              </li>
                              <li> <%=link_to "Post", posts_path%> </li>
                        </ul>
                        <!--end:sf-menu -->
                        <span class="rightcorner pngfix"></span> </div>
                  <!--end:top-menu -->
            </div>
            <!--end:menu grid -->
            <div class="grid_16">
                  <!--start:subtitle grid -->
                  <div class="subtitle">
                        <div class= "error">
						<% flash.each do |name, msg| %>
						  <%= content_tag :div, msg, :id => "flash_#{name}" %>
						<% end %>
                  </div>
            </div>
            <!--end:subtitle grid -->
      </div>
      <!--end:header container -->
</div>
</div>
<!--end:header -->
<div class="clear">&nbsp;</div>
<div class="container_16">
      <!--start:content container -->
      <div class="grid_11 sepline">
            <!--start:left content -->
            <div class="box-content">
                  <!--start:box-content -->
				  <%=yield%>
                  <!--End blockquote-->
            </div>
            <!--end:box-content -->
      </div>
      <!--end:left content -->
      <div class="grid_5">
            <!--start:right content -->
            <div class="box-content">
                  <!--start:box-content -->
                  <!--Start Subnav-->
                  <ul class="subnav">
					<%if @current_user%>
                        <li class="current"><%=link_to_unless_current "Ver perfil",user_path(@current_user)%></li>
                        <li class="current"><%=link_to_unless_current "Editar perfil",edit_user_path(@current_user)%></li>
					<%end%>
                  </ul>
                  <!--End Subnav-->
                  <br />
                  <!--Start News-->
				  <%if (Post.all[-1])%>
                  <h3>Ultimos Post</h3>
                  <ul class="newslist">
                        <li> <%=link_to Post.all[-1].title, Post.all[-1]%><span class="date"><%=Post.all[-1].created_at%></span>  <%=Post.all[-1].content[0,100] %>... </li>
                        <%if (Post.all[-2])%><li> <%=link_to Post.all[-2].title, Post.all[-2]%> <span class="date"><%=Post.all[-2].created_at%></span> <%=Post.all[-2].content[0,100] %>... </li><%end%>
                        <%if (Post.all[-3])%><li> <%=link_to Post.all[-3].title, Post.all[-3]%> <span class="date"><%=Post.all[-3].created_at%></span> <%=Post.all[-3].content[0,100] %>... </li><%end%>
                  </ul>
				  <%end%>
                  <!--End News-->
            </div>
            <!--end:box-content -->
      </div>
      <!--end:right content -->
</div>
<!--start:content container -->
<div class="clear"></div>
<!-- End middle content -->
<div class="footer">
      <!--start:footer -->
      <div class="container_16">
            <!--start:footer container -->
            <div class="footer_left">
                  <!--start:footer left part-->
                  <p> &copy; Copyright 2009 All Rights Reserved by <a href="#">Ornare.com</a></p>
	       </div>
            <!--start:footer left part-->
            <div class="footer_right">
                  <!--start:footer right part-->
                  <p>Designed and Developed by <a href="http://www.themeflash.com" target="_blank">Themeflash.com</a></p>
            </div>
            <!--end:footer right part-->
      </div>
      <!--end:footer container -->
</div>
<!--end:footer -->
</body>
</html>